<?php

namespace frontend\models;

use Yii;

/**
 * This is the model class for table "sc_goodsfen".
 *
 * @property integer $gf_id
 * @property string $gf_name
 * @property integer $praent_id
 *
 * @property Goods[] $goods
 */
class ScGoodsfen extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'sc_goodsfen';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['gf_name', 'praent_id'], 'required'],
            [['praent_id'], 'integer'],
            [['gf_name'], 'string', 'max' => 30]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'gf_id' => 'Gf ID',
            'gf_name' => 'Gf Name',
            'praent_id' => 'Praent ID',
        ];
    }

    /**
     * @return \yii\db\ActiveQuery
     */
    public function getGoods()
    {
        return $this->hasMany(Goods::className(), ['gf_id' => 'gf_id']);
    }
}
